let isDev = process.env.NODE_ENV === "development";

const UUID = isDev ? "uuid_key_dev" : "uuid_key";
const HAS_LOGIN = isDev ? "has_login_key_dev" : "has_login_key";
const ACCESS_TOKEN = isDev ? "access_token_key_dev" : "access_token_key";
const USER_INFO = isDev ? "user_info_obj_dev" : "user_info_obj";
export default {
	// 写入用户信息
	setUserInfo(val) {
		uni.setStorageSync(USER_INFO, val);
	},
	// 获取用户信息
	getUserInfo() {
		return uni.getStorageSync(USER_INFO);
	},
	// 删除用户信息
	removeUserInfo() {
		uni.removeStorageSync(USER_INFO);
	},
	// 写入uuid
	setUuid(val) {
		uni.setStorageSync(UUID, val);
	},
	// 获取uuid
	getUuid() {
		return uni.getStorageSync(UUID);
	},
	// 删除uuid
	removeUuid() {
		uni.removeStorageSync(UUID);
	},
	// 写入登录
	setHasLogin(val) {
		uni.setStorageSync(HAS_LOGIN, val);
	},
	// 获取是否登录
	getHasLogin() {
		return uni.getStorageSync(HAS_LOGIN);
	},
	// 写入accessToken
	setAccessToken(val) {
		uni.setStorageSync(ACCESS_TOKEN, val);
	},
	// 获取accessToken
	getAccessToken() {
		return uni.getStorageSync(ACCESS_TOKEN);
	},
	// 删除token
	removeAccessToken() {
		uni.removeStorageSync(ACCESS_TOKEN);
	},


};
